[gd_scene load_steps=7 format=3 uid="uid://bq7ibhm0txl5p"]

[ext_resource type="Script" path="res://addons/keychain/ShortcutEdit.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://ca58ufal2ufd8" path="res://addons/keychain/assets/joy_button.svg" id="2"]
[ext_resource type="Texture2D" uid="uid://c2s5rm4nec5yh" path="res://addons/keychain/assets/keyboard.svg" id="3"]
[ext_resource type="Texture2D" uid="uid://bb6q6om3d08cm" path="res://addons/keychain/assets/joy_axis.svg" id="4"]
[ext_resource type="Texture2D" uid="uid://bma7xj2rqqcr8" path="res://addons/keychain/assets/mouse.svg" id="5"]
[ext_resource type="PackedScene" uid="uid://bfjcafe2kvx7n" path="res://addons/keychain/ShortcutSelectorDialog.tscn" id="6"]

[node name="ShortcutEdit" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_vertical = 3
script = ExtResource("1")

[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_vertical = 3

[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2

[node name="ProfileLabel" type="Label" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Shortcut profile:"

[node name="ProfileOptionButton" type="OptionButton" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
mouse_default_cursor_shape = 2

[node name="NewProfile" type="Button" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
mouse_default_cursor_shape = 2
text = "New"

[node name="RenameProfile" type="Button" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
mouse_default_cursor_shape = 2
text = "Rename"

[node name="DeleteProfile" type="Button" parent="VBoxContainer/HBoxContainer"]
visible = false
layout_mode = 2
size_flags_horizontal = 3
mouse_default_cursor_shape = 2
text = "Delete"

[node name="OpenProfileFolder" type="Button" parent="VBoxContainer/HBoxContainer"]
visible = false
layout_mode = 2
size_flags_horizontal = 3
mouse_default_cursor_shape = 2
text = "Open Folder"

[node name="ShortcutTree" type="Tree" parent="VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
hide_root = true

[node name="ShortcutTypeMenu" type="PopupMenu" parent="."]
size = Vector2i(154, 116)
item_count = 4
item_0/text = "Key"
item_0/icon = ExtResource("3")
item_1/text = "Mouse Button"
item_1/icon = ExtResource("5")
item_1/id = 1
item_2/text = "Joy Button"
item_2/icon = ExtResource("2")
item_2/id = 2
item_3/text = "Joy Axis"
item_3/icon = ExtResource("4")
item_3/id = 3

[node name="KeyboardShortcutSelectorDialog" parent="." instance=ExtResource("6")]
size = Vector2i(417, 134)

[node name="MouseShortcutSelectorDialog" parent="." instance=ExtResource("6")]
size = Vector2i(417, 134)
input_type = 1

[node name="JoyKeyShortcutSelectorDialog" parent="." instance=ExtResource("6")]
size = Vector2i(417, 134)
input_type = 2

[node name="JoyAxisShortcutSelectorDialog" parent="." instance=ExtResource("6")]
size = Vector2i(417, 134)
input_type = 3

[node name="ProfileSettings" type="ConfirmationDialog" parent="."]

[node name="ProfileName" type="LineEdit" parent="ProfileSettings"]
offset_left = 8.0
offset_top = 8.0
offset_right = 192.0
offset_bottom = 51.0

[node name="DeleteConfirmation" type="ConfirmationDialog" parent="."]
size = Vector2i(427, 100)
dialog_text = "Are you sure you want to delete this shortcut profile?"

[connection signal="item_selected" from="VBoxContainer/HBoxContainer/ProfileOptionButton" to="." method="_on_ProfileOptionButton_item_selected"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer/NewProfile" to="." method="_on_NewProfile_pressed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer/RenameProfile" to="." method="_on_RenameProfile_pressed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer/DeleteProfile" to="." method="_on_DeleteProfile_pressed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer/OpenProfileFolder" to="." method="_on_OpenProfileFolder_pressed"]
[connection signal="button_clicked" from="VBoxContainer/ShortcutTree" to="." method="_on_shortcut_tree_button_clicked"]
[connection signal="item_activated" from="VBoxContainer/ShortcutTree" to="." method="_on_ShortcutTree_item_activated"]
[connection signal="id_pressed" from="ShortcutTypeMenu" to="." method="_on_ShortcutTypeMenu_id_pressed"]
[connection signal="confirmed" from="ProfileSettings" to="." method="_on_ProfileSettings_confirmed"]
[connection signal="confirmed" from="DeleteConfirmation" to="." method="_on_DeleteConfirmation_confirmed"]
